class @AdminBookEditModel extends Backbone.Model

    defaults:
        BookId: 0
        FileName: ''
        Avatar: ''
        DateOfPublish: ''
        ShortContent: ''
        Name: ''
        Authors: ''
        Categories: ''
        UserId: 0
        SuccessMessage: ''      

    url: ->
        url = SiteMap.Admin.Books.Edit + "?bookId=" + @attributes.BookId
        return encodeURI(url)

    parse: (response) ->
        return {
                BookId: response.BookId 
                FileName: response.FileName
                Avatar: response.Avatar
                DateOfPublish: response.Date
                ShortContent: response.ShortContent
                Name: response.Name
                Authors: response.Authors
                Categories: response.Categories
                UserId: response.UserId
                SuccessMessage: response.SuccessMessage
            }
